#include "include/Castle.h"
#include "include/Tower1.h"

#ifndef MODEL_H
#include "include/Model.h"
#endif
#ifndef VIEW_H
#include "include/View.h"
#endif

using namespace std;

/*Model
/.cpp file for model class
/
/ Created by : Emilio E. Venegas
/              Sharol Chand
/              Paola Medina
/
/     2011-10-13  Brian L. Donat  Modified Code to eliminate compile errors
/                                     and added update method, friend to Controller.
*/

Model::Model() {
    count = 0;
}

int Model::update(int argc, char* argv[]) {
  int retVal = 0;

  return retVal;
}

//************************************************************
//This function is to return the name of the game to the view*
//************************************************************

const char *Model::getName() const
		{
			return nameof_game;
		}
//*************************************************************
//This function is to return the health of the castle         *
//*************************************************************

int Model::getHealth(Castle &H)
	{
		return H.health;
	}

//*************************************************************
//This function is to the current health of the castle        *
//*************************************************************

void Model::setHealth(int h, Castle &hlth)
	{
		hlth.health = h;
    }

//*************************************************************
//This function is to return the fire power of the tower      *
//*************************************************************

int Model::getFirePower(Tower1 &f)
	{
		return f.FirePower;
	}

//*************************************************************
//This function is to return the cost of buying the tower     *
//*************************************************************

int Model::getCost_Value(Tower1 &c)
	{
		return c.Cost_Value;
	}

//************************************************************************
//This function is used to set the speed of the tower(how fast to shoot).*
//************************************************************************
int Model::getShot_Speed(Tower1 &s)
{
	return s.Shot_Speed;
}

int Model::addone(int num) {
    count+= num;
    return num;
}
